package com.fqgj.xjd.user.client.enums;

/**
 * pan状态枚举
 *
 * @author liuming
 * Created on 下午2:31 2018/8/31.
 */
public enum PanStatusEnum {
    INIT("I", "init"),
    YES("Y", "check success"),
    NO("N", "check fail"),
    ERROR("E", "check error"),
    RE_UPLOAD("R", "re-upload");

    String status;
    String desc;

    PanStatusEnum(String status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public String getStatus() {
        return status;
    }

    public PanStatusEnum setStatus(String status) {
        this.status = status;
        return this;
    }

    public String getDesc() {
        return desc;
    }

    public PanStatusEnum setDesc(String desc) {
        this.desc = desc;
        return this;
    }

    public static PanStatusEnum getEnumByStatus(String status) {
        PanStatusEnum panStatusEnum = null;
        for (PanStatusEnum enumObj : PanStatusEnum.values()) {
            if (enumObj.getStatus().equals(status)) {
                panStatusEnum = enumObj;
                break;
            }
        }
        return panStatusEnum;
    }
}
